

public abstract class ComputerRequest {

    private int voltage = 20;

    public void charge(){
        if(voltageChange() == voltage){
            System.out.println("电压符合要求，可以充电。");
        }else{
            System.out.println("电压符合要求，拒绝充电。");
        }
    }

    public abstract int voltageChange();

    public abstract void setElectricSource(ElectricSource es);
}
